package com.ysd.lis.controller.lab;


import com.ysd.common.Result;
import com.ysd.lis.annotation.MainInfoLog;
import com.ysd.lis.aspect.OperationType;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.lab.LabMaininfo;
import com.ysd.lis.request.LabMainInfoBatchDelete;
import com.ysd.lis.request.bac.BacRptOverviewParam;
import com.ysd.lis.service.lab.LabMaininfoBacService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author Cfz
 * @since 2023-12-26
 */
@RestController
@RequestMapping("/lab/maininfoBac")
public class LabMaininfoBacController extends BaseController {

    @Autowired
    LabMaininfoBacService labMaininfoBacService;

    @ApiOperation("删除标本")
    @PostMapping("/deleteMaininfoBacById")
    @MainInfoLog(operationType = OperationType.DELETE, module = "检验报告", content = "删除标本", businessName = "mainInfo")
    public Result deleteMaininfoBacById(@RequestBody LabMaininfo labMaininfo) {
        return labMaininfoBacService.deleteMaininfoBacById(labMaininfo);
    }

    @ApiOperation("批量删除")
    @PostMapping("/labMainInfoBatchDelete")
    public Result LabMainInfoBatchDelete(@RequestBody LabMainInfoBatchDelete input) {
        return labMaininfoBacService.LabMainInfoBatchDelete(input);
    }

    @ApiOperation("根据ID获取maininfo信息")
    @GetMapping("/findMainInfoById")
    public Result findMainInfoById(LabMaininfo labMaininfo) {
        return labMaininfoBacService.findMainInfoById(labMaininfo);
    }

    @ApiOperation("报告查询")
    @GetMapping("/findBacReportList")
    public Result findBacReportList(BacRptOverviewParam input) {
        return labMaininfoBacService.findBacReportList(input);
    }
}
